<template>
  <el-sub-menu index="8">
    <template #title>工具箱</template>
    <el-menu-item index="8-1" @click="distance">测量距离</el-menu-item>
    <el-menu-item index="8-2" @click="measuredArea">测量面积</el-menu-item>
    <el-menu-item index="8-3" @click="cancal">关闭测量</el-menu-item>
    <el-menu-item index="8-4" @click="loadMap"> 下载图片 </el-menu-item>
  </el-sub-menu>
</template>

<script setup>
import { measured } from "./Hooks/measured"
const map = ref()
onMounted(() => {
  //初始化地图
  map.value = useGlobalMap()
})
const { distance, measuredArea, cancal, loadMap } = measured(map)
</script>

<style scoped></style>
